import datetime

def datelist(start, end):
    start_date = datetime.date(*start)
    end_date = datetime.date(*end)

    result = []
    curr_date = start_date
    while curr_date != end_date:
        result.append("%04d/%02d/%02d" % (curr_date.year, curr_date.month, curr_date.day))
        curr_date += datetime.timedelta(1)
    result.append("%04d/%02d/%02d" % (curr_date.year, curr_date.month, curr_date.day))
    return result

if __name__ == "__main__":

    end = datetime.datetime.now().strftime('%Y/%m/%d')
    print end
    this_y = int(end.split("/")[0])
    this_m = int(end.split("/")[1])
    this_d = int(end.split("/")[2])

    start =  datetime.datetime.now() + datetime.timedelta(days=-354)
    start = start.strftime('%Y/%m/%d')
    print start
    start_y = int(start.split("/")[0])
    start_m = int(start.split("/")[1])
    start_d = int(start.split("/")[2])
    list_date = datelist((start_y, start_m, start_d), (this_y, this_m, this_d))
    print list_date
